package com.coderman.daoclient;


import com.coderman.daoclient.bean.CsdnBlog;
import com.coderman.daoclient.bean.DBBean;
import com.coderman.daoclient.dao.impl.IDaoImpl;

import java.util.Date;
import java.util.List;

/**
 * Created by ${fanchunshuai} on 2017-8-2.
 *
 * @version: V1.0
 * @Desc:
 * @Copyright (c) 2017 58到家-版权所有
 */
public class IDaoImplTest extends IDaoImpl<CsdnBlog,Long> {

    public static void main(String[] args) {
        IDaoImplTest iDaoImplTest = new IDaoImplTest();
        /*com.coderman.daoclient.bean.DBBean bean = new com.coderman.daoclient.bean.DBBean();
        bean.setAge(37);
        bean.setCreateTime(new Date());
        bean.setName("我是程序男，coderman111111");
        bean.setValue("程序男的博客1111");
        try {
           long id = iDaoImplTest.insertEntity(bean);
            System.out.println(id+"-------");
        } catch (Exception e) {
            e.printStackTrace();
        }*/

        try {
           List<CsdnBlog> csdnBlogList = iDaoImplTest.getList(CsdnBlog.class);
            for (CsdnBlog csdnBlog : csdnBlogList){
                System.out.println(csdnBlog.toString());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
